import myaxios from "@/http/MyAxios";
import BASEURL from "@/http/UrlBase";
const { BMDURL } = BASEURL;
const addressApi = {
    /**
 * 通过用户ID查询地址
 * @param {{uid: number}} params 接收对象 { uid }
 */
    queryByUid(params) {
        return myaxios.get(BMDURL + "/address/uid", params);
    },
    /**
      * 通过id修改地址信息
      * @param {Object} params 
      * @returns 
      */
    update(params) {
        return myaxios.post(BMDURL + '/address/update', params)
    },
    /**
 * 通过id删除地址
 * @param {Object} params 
 * @returns 
 */
    delete(params) {
        return myaxios.post(BMDURL + '/address/delete', params)
    },
    /**
   * 新增地址
   * @param {Object} params 
   * @returns 
   */
    add(params) {
        return myaxios.post(BMDURL + '/address/add', params)
    },
}
export default addressApi